-- Decompiled with the Synapse X Luau decompiler.

local Players = game:GetService("Players");
local LocalPlayer = Players.LocalPlayer;
local ClientOHOH = _G.ClientOHOH;
local Client_PayManager = ClientOHOH.load.Client_PayManager();
local Client_AudioManager = ClientOHOH.load.Client_AudioManager();
local M = ClientOHOH.class.new(script, ClientOHOH.files.GameObject());
local LocalizationHelper = ClientOHOH.load.LocalizationHelper();
function M.ctor(self)
	M.super.ctor(self, workspace);
	LocalizationHelper:SetTranslatorByPlayer(LocalPlayer);
	
end;

--开始游戏
function M.Start(self)
	if self.OnStart then
		self:AddProcess(self.OnStart);
	end;
end;
function M.dtor(self)
	M.super.dtor(self);
end;

-- 创建角色
function M.CreateLoaclPlayer(self)
	--print("C_PPA---CreateLoaclPlayer>")	
	self.local_player = ClientOHOH.load.Client_Player().new(LocalPlayer);
	--print("C_PPA---PlayerIn>0")	

	self:PlayerIn(self.local_player);
end;
local gCEM = ClientOHOH.load.ClientEventManager();
local gCFM = ClientOHOH.load.ClientFunctionManager();


--角色进入
function M.PlayerIn(self, local_player)
	--print("C_PPA---PlayerIn>1")	

	gCEM:DelayGet(local_player);
	gCFM:DelayGet(local_player);

	if self.OnPlayerIn then
		--print("C_PPA---PlayerIn>self.OnPlayerIn")	

		self:AddProcess(self.OnPlayerIn, local_player);
	end;
end;

--角色退出
function M.PlayerOut(self, p8)
	if self.OnPlayerOut then
		--print("C_PPA---PlayerIn>self.OnPlayerOut")	

		self:AddProcess(self.OnPlayerOut, p8);
	end;
end;
local InstanceManager = ClientOHOH.load.InstanceManager();

--获取角色对象（自定义）
function M.GetPlayerObjectByUserId(self, userId)
	assert(userId, "param id is nil");
	return InstanceManager:FindObject((Players:GetPlayerByUserId(userId)));
end;

--获取角色实列（系统）
function M.GetPlayerInstanceByUserId(self, p12)
	assert(p12, "param id is nil");
	return Players:GetPlayerByUserId(p12);
end;
return M;
